<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="v2/layout">
  <head>
    <title>欢迎进入管理系统</title>
    <script type="text/javascript" th:inline="javascript">
    	var orgName = [[${session.user.name}]];
    	var state = getParam("state", "");
    	$(function(){
    		setMenu("推荐比赛", true);
    		$("#listPage").page({url:"ref-list",data:{state:state}, success:function(ret){
      			$.each(ret.obj.content, function(i,v){
        			v.createdAt = new Date(v.createdAt).Format("yyyy-MM-dd HH:mm");
        		});
      			$("#list").loadData({content:ret.obj.content,orgName:orgName});
      		}});
    	});
    </script>
    <style>
    </style>
  </head>
  <body>
    <div layout:fragment="content">
		<div class="info info-full">
			<div class="table_list">
               <div class="table-overflow">
                   <table class="table">
                       <thead>
                           <tr>
                               <th width="100px">比赛概况</th>
                               <th>比赛创建时间</th>
                               <th>比赛系统时间</th>
                               <th>发布状态</th>
                               <th>报名人数</th>
                               <th>操作</th>
                           </tr>
                       </thead>
                       <tbody>
                       <script type="template" id="list">
						#for(data:content)#
						<tr>
                       	<td>
                       		<div class="a_eval">
                       			<div class="a_eval-left"><img class="a_eval-img" src="#{data.coverUrl}#"/></div>
                       			<div class="a_eval-right">
                       				<div class="a_eval-title"><strong>#{data.title}#</strong></div>
                       				<div class="a_eval-desc">
                       					<span class="a_eval-label">地点：</span>
                       					<span class="a_eval-text">#{data.area}#</span>
                       				</div>
                       				<div class="a_eval-desc">
                       					<span class="a_eval-label">时间：</span>
                       					<span class="a_eval-text">#{data.timeInList}#</span>
                       				</div>
                       				<div class="a_eval-desc">
                       					<span class="a_eval-label">主办方：</span>
                       					<span class="a_eval-text">#{data.orgName}#</span>
                       				</div>
                       				<div class="a_eval-desc">
                       					<span class="a_eval-label">报名费：</span>
                       					<span class="a_eval-text">#{data.charge}#</span>
                       				</div>
                       			</div>
                       		</div>
                       	</td>
						<td>#{data.createdAt}#</td>
						<td>#{data.timeInList}#</td>
						<td>#{data.stateDesc}#</td>
						<td>#{data.applyCount}#</td>
						<td>
							<div class="tab-btn-list">
								<a class="tab-btn-item" href="ref-apply?id=#{data.id}#">查看报名信息</a>
							</div>
						</td>
                       </tr>
						#endfor#
						</script>
                     </tbody>
                 </table>
                 <div id="listPage"></div>
             </div>
          </div>
    	</div>
    	
    </div>
  </body>
</html>